package com.toilet.easyvideofx.config;

import com.toilet.easyvideofx.api.GreetService;
import io.helidon.webserver.http.HttpRouting;
import io.helidon.webserver.staticcontent.StaticContentService;

public class HelidonConfig {

    /**
     * 配置服务，若url为/greet，会调用GreetService类中的方法
     * 若url为/static，会访问web/upload的静态资源
     */
    public static void routing(HttpRouting.Builder routing) {
        routing.register("/greet", new GreetService())
                //配置访问静态文件
                .register("/static", StaticContentService.builder("/web/upload"));
    }
}
